//
//  MultiTouch2OSC
//  2009 Michael Gubik.
//

#import <Cocoa/Cocoa.h>
#import <VVOSC/VVOSC.h>
#import <Quartz/Quartz.h>

#import "MTVisualizingView.h"

@class MTRespondingView;

@interface AppController : NSObject 
{
   /// User Interface
	IBOutlet NSWindow *window;
	IBOutlet MTRespondingView *multiTouchRespondingView;
	MTVisualizingView *multiTouchVisualizingView;
	
	NSRect windowRectForNonFullScreenMode;
	BOOL isInFullScreenMode;

	NSThread *myThread;
	NSLock *lockForCompositionInput;

	
	// Preferences Panel
	IBOutlet NSPanel *preferencesPanel;
	IBOutlet NSTextField *ipAddressTextField;
	IBOutlet NSTextField *portTextField;
	IBOutlet NSButton *setIPAndPortButton;
	
	NSMutableArray *touchDicts;

   /// OSC Output
	OSCManager *oscManager;
	OSCOutPort *outPort;	
	
}
 
@property(readonly) NSLock *lockForCompositionInput;

- (IBAction)toggleFullScreen:(id)sender;

- (void)packAndSendOSCMessage;

- (void)updateCompositionWithTouchArray:(NSArray *)touchArray;


- (IBAction)changeIPAddressAndPort:(id)sender;
- (IBAction)setIPAddressToLocalhost:(id)sender;

@end
